home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIURLParser.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  15KB  |  213 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIURLParser.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIURLParser_h__
  6. #define __gen_nsIURLParser_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIURLParser */
  19. #define NS_IURLPARSER_IID_STR "7281076d-cf37-464a-815e-698235802604"
  20.  
  21. #define NS_IURLPARSER_IID \
  22.   {0x7281076d, 0xcf37, 0x464a, \
  23.     { 0x81, 0x5e, 0x69, 0x82, 0x35, 0x80, 0x26, 0x04 }}
  24.  
  25. /**
  26.  * nsIURLParser specifies the interface to an URL parser that attempts to
  27.  * follow the definitions of RFC 2396.
  28.  */
  29. class NS_NO_VTABLE nsIURLParser : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IURLPARSER_IID)
  33.  
  34.   /**
  35.      * The string to parse in the following methods may be given as a null
  36.      * terminated string, in which case the length argument should be -1.
  37.      *
  38.      * Out parameters of the following methods are all optional (ie. the caller
  39.      * may pass-in a NULL value if the corresponding results are not needed).
  40.      * Signed out parameters may hold a value of -1 if the corresponding result
  41.      * is not part of the string being parsed.
  42.      *
  43.      * The parsing routines attempt to be as forgiving as possible.
  44.      */
  45. /**
  46.      * ParseSpec breaks the URL string up into its 3 major components: a scheme,
  47.      * an authority section (hostname, etc.), and a path.
  48.      *
  49.      * spec = <scheme>://<authority><path>
  50.      */
  51.   /* void parseURL (in string spec, in long specLen, out unsigned long schemePos, out long schemeLen, out unsigned long authorityPos, out long authorityLen, out unsigned long pathPos, out long pathLen); */
  52.   NS_IMETHOD ParseURL(const char *spec, PRInt32 specLen, PRUint32 *schemePos, PRInt32 *schemeLen, PRUint32 *authorityPos, PRInt32 *authorityLen, PRUint32 *pathPos, PRInt32 *pathLen) = 0;
  53.  
  54.   /**
  55.      * ParseAuthority breaks the authority string up into its 4 components:
  56.      * username, password, hostname, and hostport.
  57.      *
  58.      * auth = <username>:<password>@<hostname>:<port>
  59.      */
  60.   /* void parseAuthority (in string authority, in long authorityLen, out unsigned long usernamePos, out long usernameLen, out unsigned long passwordPos, out long passwordLen, out unsigned long hostnamePos, out long hostnameLen, out long port); */
  61.   NS_IMETHOD ParseAuthority(const char *authority, PRInt32 authorityLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port) = 0;
  62.  
  63.   /**
  64.      * userinfo = <username>:<password>
  65.      */
  66.   /* void parseUserInfo (in string userinfo, in long userinfoLen, out unsigned long usernamePos, out long usernameLen, out unsigned long passwordPos, out long passwordLen); */
  67.   NS_IMETHOD ParseUserInfo(const char *userinfo, PRInt32 userinfoLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen) = 0;
  68.  
  69.   /**
  70.      * serverinfo = <hostname>:<port>
  71.      */
  72.   /* void parseServerInfo (in string serverinfo, in long serverinfoLen, out unsigned long hostnamePos, out long hostnameLen, out long port); */
  73.   NS_IMETHOD ParseServerInfo(const char *serverinfo, PRInt32 serverinfoLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port) = 0;
  74.  
  75.   /**
  76.      * ParsePath breaks the path string up into its 4 major components: a file path,
  77.      * a param string, a query string, and a reference string.
  78.      *
  79.      * path = <filepath>;<param>?<query>#<ref>
  80.      */
  81.   /* void parsePath (in string path, in long pathLen, out unsigned long filepathPos, out long filepathLen, out unsigned long paramPos, out long paramLen, out unsigned long queryPos, out long queryLen, out unsigned long refPos, out long refLen); */
  82.   NS_IMETHOD ParsePath(const char *path, PRInt32 pathLen, PRUint32 *filepathPos, PRInt32 *filepathLen, PRUint32 *paramPos, PRInt32 *paramLen, PRUint32 *queryPos, PRInt32 *queryLen, PRUint32 *refPos, PRInt32 *refLen) = 0;
  83.  
  84.   /**
  85.      * ParseFilePath breaks the file path string up into: the directory portion,
  86.      * file base name, and file extension.
  87.      *
  88.      * filepath = <directory><basename>.<extension>
  89.      */
  90.   /* void parseFilePath (in string filepath, in long filepathLen, out unsigned long directoryPos, out long directoryLen, out unsigned long basenamePos, out long basenameLen, out unsigned long extensionPos, out long extensionLen); */
  91.   NS_IMETHOD ParseFilePath(const char *filepath, PRInt32 filepathLen, PRUint32 *directoryPos, PRInt32 *directoryLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen) = 0;
  92.  
  93.   /**
  94.      * filename = <basename>.<extension>
  95.      */
  96.   /* void parseFileName (in string filename, in long filenameLen, out unsigned long basenamePos, out long basenameLen, out unsigned long extensionPos, out long extensionLen); */
  97.   NS_IMETHOD ParseFileName(const char *filename, PRInt32 filenameLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen) = 0;
  98.  
  99. };
  100.  
  101. /* Use this macro when declaring classes that implement this interface. */
  102. #define NS_DECL_NSIURLPARSER \
  103.   NS_IMETHOD ParseURL(const char *spec, PRInt32 specLen, PRUint32 *schemePos, PRInt32 *schemeLen, PRUint32 *authorityPos, PRInt32 *authorityLen, PRUint32 *pathPos, PRInt32 *pathLen); \
  104.   NS_IMETHOD ParseAuthority(const char *authority, PRInt32 authorityLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port); \
  105.   NS_IMETHOD ParseUserInfo(const char *userinfo, PRInt32 userinfoLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen); \
  106.   NS_IMETHOD ParseServerInfo(const char *serverinfo, PRInt32 serverinfoLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port); \
  107.   NS_IMETHOD ParsePath(const char *path, PRInt32 pathLen, PRUint32 *filepathPos, PRInt32 *filepathLen, PRUint32 *paramPos, PRInt32 *paramLen, PRUint32 *queryPos, PRInt32 *queryLen, PRUint32 *refPos, PRInt32 *refLen); \
  108.   NS_IMETHOD ParseFilePath(const char *filepath, PRInt32 filepathLen, PRUint32 *directoryPos, PRInt32 *directoryLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen); \
  109.   NS_IMETHOD ParseFileName(const char *filename, PRInt32 filenameLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen); 
  110.  
  111. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  112. #define NS_FORWARD_NSIURLPARSER(_to) \
  113.   NS_IMETHOD ParseURL(const char *spec, PRInt32 specLen, PRUint32 *schemePos, PRInt32 *schemeLen, PRUint32 *authorityPos, PRInt32 *authorityLen, PRUint32 *pathPos, PRInt32 *pathLen) { return _to ParseURL(spec, specLen, schemePos, schemeLen, authorityPos, authorityLen, pathPos, pathLen); } \
  114.   NS_IMETHOD ParseAuthority(const char *authority, PRInt32 authorityLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port) { return _to ParseAuthority(authority, authorityLen, usernamePos, usernameLen, passwordPos, passwordLen, hostnamePos, hostnameLen, port); } \
  115.   NS_IMETHOD ParseUserInfo(const char *userinfo, PRInt32 userinfoLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen) { return _to ParseUserInfo(userinfo, userinfoLen, usernamePos, usernameLen, passwordPos, passwordLen); } \
  116.   NS_IMETHOD ParseServerInfo(const char *serverinfo, PRInt32 serverinfoLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port) { return _to ParseServerInfo(serverinfo, serverinfoLen, hostnamePos, hostnameLen, port); } \
  117.   NS_IMETHOD ParsePath(const char *path, PRInt32 pathLen, PRUint32 *filepathPos, PRInt32 *filepathLen, PRUint32 *paramPos, PRInt32 *paramLen, PRUint32 *queryPos, PRInt32 *queryLen, PRUint32 *refPos, PRInt32 *refLen) { return _to ParsePath(path, pathLen, filepathPos, filepathLen, paramPos, paramLen, queryPos, queryLen, refPos, refLen); } \
  118.   NS_IMETHOD ParseFilePath(const char *filepath, PRInt32 filepathLen, PRUint32 *directoryPos, PRInt32 *directoryLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen) { return _to ParseFilePath(filepath, filepathLen, directoryPos, directoryLen, basenamePos, basenameLen, extensionPos, extensionLen); } \
  119.   NS_IMETHOD ParseFileName(const char *filename, PRInt32 filenameLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen) { return _to ParseFileName(filename, filenameLen, basenamePos, basenameLen, extensionPos, extensionLen); } 
  120.  
  121. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  122. #define NS_FORWARD_SAFE_NSIURLPARSER(_to) \
  123.   NS_IMETHOD ParseURL(const char *spec, PRInt32 specLen, PRUint32 *schemePos, PRInt32 *schemeLen, PRUint32 *authorityPos, PRInt32 *authorityLen, PRUint32 *pathPos, PRInt32 *pathLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseURL(spec, specLen, schemePos, schemeLen, authorityPos, authorityLen, pathPos, pathLen); } \
  124.   NS_IMETHOD ParseAuthority(const char *authority, PRInt32 authorityLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseAuthority(authority, authorityLen, usernamePos, usernameLen, passwordPos, passwordLen, hostnamePos, hostnameLen, port); } \
  125.   NS_IMETHOD ParseUserInfo(const char *userinfo, PRInt32 userinfoLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseUserInfo(userinfo, userinfoLen, usernamePos, usernameLen, passwordPos, passwordLen); } \
  126.   NS_IMETHOD ParseServerInfo(const char *serverinfo, PRInt32 serverinfoLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseServerInfo(serverinfo, serverinfoLen, hostnamePos, hostnameLen, port); } \
  127.   NS_IMETHOD ParsePath(const char *path, PRInt32 pathLen, PRUint32 *filepathPos, PRInt32 *filepathLen, PRUint32 *paramPos, PRInt32 *paramLen, PRUint32 *queryPos, PRInt32 *queryLen, PRUint32 *refPos, PRInt32 *refLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParsePath(path, pathLen, filepathPos, filepathLen, paramPos, paramLen, queryPos, queryLen, refPos, refLen); } \
  128.   NS_IMETHOD ParseFilePath(const char *filepath, PRInt32 filepathLen, PRUint32 *directoryPos, PRInt32 *directoryLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseFilePath(filepath, filepathLen, directoryPos, directoryLen, basenamePos, basenameLen, extensionPos, extensionLen); } \
  129.   NS_IMETHOD ParseFileName(const char *filename, PRInt32 filenameLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseFileName(filename, filenameLen, basenamePos, basenameLen, extensionPos, extensionLen); } 
  130.  
  131. #if 0
  132. /* Use the code below as a template for the implementation class for this interface. */
  133.  
  134. /* Header file */
  135. class nsURLParser : public nsIURLParser
  136. {
  137. public:
  138.   NS_DECL_ISUPPORTS
  139.   NS_DECL_NSIURLPARSER
  140.  
  141.   nsURLParser();
  142.  
  143. private:
  144.   ~nsURLParser();
  145.  
  146. protected:
  147.   /* additional members */
  148. };
  149.  
  150. /* Implementation file */
  151. NS_IMPL_ISUPPORTS1(nsURLParser, nsIURLParser)
  152.  
  153. nsURLParser::nsURLParser()
  154. {
  155.   /* member initializers and constructor code */
  156. }
  157.  
  158. nsURLParser::~nsURLParser()
  159. {
  160.   /* destructor code */
  161. }
  162.  
  163. /* void parseURL (in string spec, in long specLen, out unsigned long schemePos, out long schemeLen, out unsigned long authorityPos, out long authorityLen, out unsigned long pathPos, out long pathLen); */
  164. NS_IMETHODIMP nsURLParser::ParseURL(const char *spec, PRInt32 specLen, PRUint32 *schemePos, PRInt32 *schemeLen, PRUint32 *authorityPos, PRInt32 *authorityLen, PRUint32 *pathPos, PRInt32 *pathLen)
  165. {
  166.     return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168.  
  169. /* void parseAuthority (in string authority, in long authorityLen, out unsigned long usernamePos, out long usernameLen, out unsigned long passwordPos, out long passwordLen, out unsigned long hostnamePos, out long hostnameLen, out long port); */
  170. NS_IMETHODIMP nsURLParser::ParseAuthority(const char *authority, PRInt32 authorityLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port)
  171. {
  172.     return NS_ERROR_NOT_IMPLEMENTED;
  173. }
  174.  
  175. /* void parseUserInfo (in string userinfo, in long userinfoLen, out unsigned long usernamePos, out long usernameLen, out unsigned long passwordPos, out long passwordLen); */
  176. NS_IMETHODIMP nsURLParser::ParseUserInfo(const char *userinfo, PRInt32 userinfoLen, PRUint32 *usernamePos, PRInt32 *usernameLen, PRUint32 *passwordPos, PRInt32 *passwordLen)
  177. {
  178.     return NS_ERROR_NOT_IMPLEMENTED;
  179. }
  180.  
  181. /* void parseServerInfo (in string serverinfo, in long serverinfoLen, out unsigned long hostnamePos, out long hostnameLen, out long port); */
  182. NS_IMETHODIMP nsURLParser::ParseServerInfo(const char *serverinfo, PRInt32 serverinfoLen, PRUint32 *hostnamePos, PRInt32 *hostnameLen, PRInt32 *port)
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186.  
  187. /* void parsePath (in string path, in long pathLen, out unsigned long filepathPos, out long filepathLen, out unsigned long paramPos, out long paramLen, out unsigned long queryPos, out long queryLen, out unsigned long refPos, out long refLen); */
  188. NS_IMETHODIMP nsURLParser::ParsePath(const char *path, PRInt32 pathLen, PRUint32 *filepathPos, PRInt32 *filepathLen, PRUint32 *paramPos, PRInt32 *paramLen, PRUint32 *queryPos, PRInt32 *queryLen, PRUint32 *refPos, PRInt32 *refLen)
  189. {
  190.     return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192.  
  193. /* void parseFilePath (in string filepath, in long filepathLen, out unsigned long directoryPos, out long directoryLen, out unsigned long basenamePos, out long basenameLen, out unsigned long extensionPos, out long extensionLen); */
  194. NS_IMETHODIMP nsURLParser::ParseFilePath(const char *filepath, PRInt32 filepathLen, PRUint32 *directoryPos, PRInt32 *directoryLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen)
  195. {
  196.     return NS_ERROR_NOT_IMPLEMENTED;
  197. }
  198.  
  199. /* void parseFileName (in string filename, in long filenameLen, out unsigned long basenamePos, out long basenameLen, out unsigned long extensionPos, out long extensionLen); */
  200. NS_IMETHODIMP nsURLParser::ParseFileName(const char *filename, PRInt32 filenameLen, PRUint32 *basenamePos, PRInt32 *basenameLen, PRUint32 *extensionPos, PRInt32 *extensionLen)
  201. {
  202.     return NS_ERROR_NOT_IMPLEMENTED;
  203. }
  204.  
  205. /* End of implementation class template. */
  206. #endif
  207.  
  208. // url parser key for use with the category manager
  209. // mapping from scheme to url parser.
  210. #define NS_IURLPARSER_KEY "@mozilla.org/urlparser;1"
  211.  
  212. #endif /* __gen_nsIURLParser_h__ */
  213.